package guda.house.dal.dao;

import guda.house.dal.dataobject.SuiteDO;
import guda.grape.autogen.common.page.BaseQuery;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

public interface SuiteDAO {


    Long insert(SuiteDO suite);

    @Cacheable(value = "villageCache", key="#suiteId + 'getSuiteById'")
    SuiteDO getSuiteById(Long suiteId);


    boolean delSuiteById(Long suiteId);

    List<SuiteDO> getSuiteByIds(List idsList);

    /**
     * 清空测试用例加入的autoincrement
     */
    void cleanAutoIncrement(Long suiteId);

    List<SuiteDO> selectForPage(BaseQuery baseQuery);

    int countForPage(BaseQuery baseQuery);

    @CacheEvict(value = "villageCache", key="#suite.suiteId + 'getSuiteById'")
    void updateByIdSelective(SuiteDO suite);


    int stat(List<Long> suiteIdList,Integer isDelivery,Integer isCheckin,Integer isDecoration);

    List<Long> getBySuiteName(String suiteName);


    List<Long> checkRepeat(String suiteName,Long unitId);

    List<SuiteDO> select(BaseQuery baseQuery);

}
